/*
 * 作者: 董绘峰
 * 时间: 2017-02-09
 * 说明：
 * Copyright (c) 2016-2017 中研沃兮
 */
define(function(require) {
	require("jquery");
    var c = require('app/utils/CommonUtils');
	var hc = require('app/utils/HttpClientUtils');
	var VideoUtils = require('app/utils/VideoUtils');
	var win = window;
	var action = {};
	var param = api.pageParam;
	var EventUtils = require('app/utils/EventUtils');
	var APIUtils = require('app/utils/APIUtils');
	param.currentppt = 0;
	
	
	EventUtils.listen(api.winName,'updatePPTstatus',false, function(data){
		param.currentppt = parseInt(data.index);	
	});
	
	var launchFooterPanel = function(opt_type){
		param.opt_type = opt_type;
		api.openFrame({
	        name: 'RoomFooterPanelFrm',
	        url: './RoomFooterPanelFrm.html',
	        rect:{
	        	x:0,
	        	y:parseInt(APIUtils.winW() * 9 /16),
	        	w:APIUtils.winW(),
	        	h:APIUtils.winH() - parseInt(APIUtils.winW() * 9 /16)
	        },
	        pageParam:param,
	        bgColor: 'rgba(0,0,0,0)',
	        reload: true
        });
	}
	
	action.startLive = function(){
		VideoUtils.startFullLive();
//		launchFooterPanel(0);
	};
	
	action.openAudioTab = function(){
		launchFooterPanel(1);
	}
	
	action.openTextTab = function(){
		launchFooterPanel(2);
	}
	
	action.openMoreTab = function(){
		launchFooterPanel(3);	
	}
	
	return action;
});